<?php
/**
 * Created by PhpStorm.
 * User: zhangbing
 * Date: 2017/3/15 0015
 * Time: 13:34
 */
namespace app\admin\Controller;
use app\models\Bases;

class Notice extends Base{
    /**
     * 公告列表
     * @return \think\response\View
     */
    public function noticeList(){
        $get = input('param.');
        $notice = new Bases('notice');
        try{
            // 条件查询
            $search = search($get,'log_time','log_action');
            $where  = $search['condition'].' and status = '.$notice::STATUS_ON;
            $list   = $notice->page($where,'id desc',15,$get);
            return view('',['list'=>$list,'page'=>$list->render(),'display'=>$search['display']]);
        } catch (\Exception $e){
            $this->error($e->getMessage());
        }
    }
}